from django.db import models

# Create your models here.
from Administrative_office_system.utils.BaseModel import BaseModel


class PurchasingRequisition(BaseModel):
    STATE = (
        ('draft', '草稿'),
        ('one', '科室负责人'),
        ('two', '分管领导'),
        ('three', '总务科意见'),
        ('four', '总务科分管领导'),
        ('six', '拒绝'),
        ('seven', '结束'),
        ('stop', '终止'),
    )
    state = models.CharField('状态', max_length=10, choices=STATE, default='one')
    apply_user = models.ForeignKey('personal_center.User', verbose_name="申请人", blank=True, null=True, on_delete=models.SET_NULL)
    company = models.ForeignKey('administrative.Company', verbose_name="上传科室", blank=False, null=False, on_delete=models.CASCADE)
    ApplicationReason = models.CharField(max_length=225, verbose_name='申请理由	', default='')
    ApplicationType = models.CharField(max_length=10, verbose_name='申请类别', default='1')
    ServiceContent = models.TextField(verbose_name='服务内容', default='')
    BudgetAmount = models.CharField(max_length=20, verbose_name='预算金额', default='')
    AmountWords = models.CharField(max_length=100, verbose_name='金额大写', default='')
    can_revise = models.CharField('是否可以修改', max_length=50, default='1')
    fj_number = models.CharField('附件id', max_length=50, default='')
    current_audit_users = models.ManyToManyField('personal_center.User', verbose_name='当前审核人员', related_name='purchasing_requisition_users', blank=True)
    audit_users_already = models.ManyToManyField('personal_center.User', verbose_name='已审核人员', related_name='purchasing_requisition_already_audit_users', blank=True)

    def get_state_str(self):
        if self.state == 'six':
            return '拒绝'
        elif self.state == 'seven':
            return '结束'
        elif self.state == 'stop':
            return '终止'
        elif self.state == 'draft':
            return '草稿'
        else:
            return '审核中'


class PurchasingRequisitionRecord(BaseModel):
    STATE = (
        ('draft', '拒绝'),
        ('audit', '同意'),
        ('unaudit', '待审核'),
    )
    NODE = (
        ('one', '科室负责人'),
        ('two', '分管领导'),
        ('three', '总务科意见'),
        ('four', '总务科分管领导'),
    )
    purchasing_requisition_id = models.ForeignKey('PurchasingRequisition', verbose_name="采购申请", blank=False, null=False, on_delete=models.CASCADE)
    state = models.CharField('状态', max_length=10, choices=STATE, default='unaudit')
    audit_people = models.ForeignKey('personal_center.User', verbose_name="审批人", blank=False, null=False, on_delete=models.CASCADE)
    audit_note = models.TextField(verbose_name="审批意见", blank=False)
    node = models.CharField('节点', max_length=10, choices=NODE, default='YB/DB')

    class Meta:
        managed = True
        verbose_name = '采购申请审批信息'
        verbose_name_plural = verbose_name

class GoodsProcure(BaseModel):
    STATE = (
        ('draft', '草稿'),
        ('one', '科室负责人'),
        ('two', '分管领导'),
        ('three', '总务科意见'),
        ('four', '总务科分管领导'),
        ('six', '拒绝'),
        ('seven', '结束'),
        ('stop', '终止'),
    )
    state = models.CharField('状态', max_length=10, choices=STATE, default='one')
    apply_user = models.ForeignKey('personal_center.User', verbose_name="申请人", blank=True, null=True, on_delete=models.SET_NULL)
    company = models.ForeignKey('administrative.Company', verbose_name="上传科室", blank=False, null=False, on_delete=models.CASCADE)
    PurchaseReason = models.CharField(max_length=225, verbose_name='申请理由	', default='')
    ApplicationType = models.CharField(max_length=10, verbose_name='申请类别', default='1')
    GoodsName = models.CharField(max_length=225, verbose_name='物品名称', default='')
    GoodsNumber = models.CharField(max_length=50, verbose_name='数量', default='')
    MaterialQuality = models.CharField(max_length=225, verbose_name='尺寸/材质/颜色/型号', default='')
    OtherRequirements = models.CharField(max_length=225, verbose_name='其他要求', default='')
    custom_made_value = models.CharField(max_length=10, verbose_name='是否定做', default='')
    BudgetAmount = models.CharField(max_length=20, verbose_name='预算金额', default='')
    AmountWords = models.CharField(max_length=100, verbose_name='金额大写', default='')
    MaterialQualityZwk = models.CharField(max_length=225, verbose_name='尺寸/材质/颜色/型号', default='')
    GoodsNumberZwk = models.CharField(max_length=50, verbose_name='数量', default='')
    can_revise = models.CharField('是否可以修改', max_length=50, default='1')
    fj_number = models.CharField('附件id', max_length=50, default='')
    current_audit_users = models.ManyToManyField('personal_center.User', verbose_name='当前审核人员', related_name='goods_procure_users', blank=True)
    audit_users_already = models.ManyToManyField('personal_center.User', verbose_name='已审核人员', related_name='goods_procure_already_audit_users', blank=True)

    def get_state_str(self):
        if self.state == 'six':
            return '拒绝'
        elif self.state == 'seven':
            return '结束'
        elif self.state == 'stop':
            return '终止'
        elif self.state == 'draft':
            return '草稿'
        else:
            return '审核中'


class GoodsProcureRecord(BaseModel):
    STATE = (
        ('draft', '拒绝'),
        ('audit', '同意'),
        ('unaudit', '待审核'),
    )
    NODE = (
        ('one', '科室负责人'),
        ('two', '分管领导'),
        ('three', '总务科意见'),
        ('four', '总务科分管领导'),
    )
    purchasing_requisition_id = models.ForeignKey('GoodsProcure', verbose_name="物资采购申请", blank=False, null=False, on_delete=models.CASCADE)
    state = models.CharField('状态', max_length=10, choices=STATE, default='unaudit')
    audit_people = models.ForeignKey('personal_center.User', verbose_name="审批人", blank=False, null=False, on_delete=models.CASCADE)
    audit_note = models.TextField(verbose_name="审批意见", blank=False)
    node = models.CharField('节点', max_length=10, choices=NODE, default='YB/DB')

    class Meta:
        managed = True
        verbose_name = '物资采购申请审批信息'
        verbose_name_plural = verbose_name

class MaintenanceRenovation(BaseModel):
    STATE = (
        ('draft', '草稿'),
        ('one', '总务科负责人'),
        ('two', '发起科室负责人'),
        ('three', '需求科室分管院长'),
        ('four', '总务科分管领导'),
        ('six', '拒绝'),
        ('seven', '结束'),
        ('stop', '终止'),
    )
    state = models.CharField('状态', max_length=10, choices=STATE, default='one')
    apply_user = models.ForeignKey('personal_center.User', verbose_name="申请人", blank=True, null=True, on_delete=models.SET_NULL)
    company = models.ForeignKey('administrative.Company', verbose_name="上传科室", blank=False, null=False, on_delete=models.CASCADE)
    EntryName = models.CharField(max_length=225, verbose_name='项目名称', default='')
    ApplicationReason = models.CharField(max_length=225, verbose_name='申请理由', default='1')
    ProjectObjectives = models.CharField(max_length=225, verbose_name='项目目标', default='')
    NecessityAnalysis = models.CharField(max_length=225, verbose_name='必要性分析', default='')
    DurationRequirements = models.CharField(max_length=225, verbose_name='工期要求', default='')
    CostEstimating = models.CharField(max_length=50, verbose_name='费用估算', default='')
    BudgetDetails = models.TextField(verbose_name="预算明细", blank=False, default='')
    can_revise = models.CharField('是否可以修改', max_length=50, default='1')
    fj_number = models.CharField('附件id', max_length=50, default='')
    current_audit_users = models.ManyToManyField('personal_center.User', verbose_name='当前审核人员', related_name='maintenance_renovation_users', blank=True)
    audit_users_already = models.ManyToManyField('personal_center.User', verbose_name='已审核人员', related_name='maintenance_renovation_already_audit_users', blank=True)
    note = models.CharField(max_length=225, verbose_name='备注', default='')
    TrialDate = models.CharField('审理日期', max_length=150, default='')

    def get_state_str(self):
        if self.state == 'six':
            return '拒绝'
        elif self.state == 'seven':
            return '结束'
        elif self.state == 'stop':
            return '终止'
        elif self.state == 'draft':
            return '草稿'
        else:
            return '审核中'


class MaintenanceRenovationRecord(BaseModel):
    STATE = (
        ('draft', '拒绝'),
        ('audit', '同意'),
        ('unaudit', '待审核'),
    )
    NODE = (
        ('one', '总务科负责人'),
        ('two', '发起科室负责人'),
        ('three', '需求科室分管院长'),
        ('four', '总务科分管领导')
    )
    purchasing_requisition_id = models.ForeignKey('MaintenanceRenovation', verbose_name="维修改造项目申请", blank=False, null=False, on_delete=models.CASCADE)
    state = models.CharField('状态', max_length=10, choices=STATE, default='unaudit')
    audit_people = models.ForeignKey('personal_center.User', verbose_name="审批人", blank=False, null=False, on_delete=models.CASCADE)
    audit_note = models.TextField(verbose_name="审批意见", blank=False)
    node = models.CharField('节点', max_length=10, choices=NODE, default='YB/DB')

    class Meta:
        managed = True
        verbose_name = '维修改造项目申请审批信息'
        verbose_name_plural = verbose_name

class ComputerDevice(BaseModel):
    STATE = (
        ('draft', '草稿'),
        ('one', '科室负责人'),
        ('two', '网络信息科'),
        ('three', '申请科室分管领导'),
        ('four', '采购部门分管领导'),
        ('six', '拒绝'),
        ('seven', '结束'),
        ('stop', '终止'),
    )
    state = models.CharField('状态', max_length=10, choices=STATE, default='one')
    apply_user = models.ForeignKey('personal_center.User', verbose_name="申请人", blank=True, null=True, on_delete=models.SET_NULL)
    company = models.ForeignKey('administrative.Company', verbose_name="上传科室", blank=False, null=False, on_delete=models.CASCADE)
    ApplicationReason = models.CharField(max_length=225, verbose_name='申请理由', default='1')
    ApplicationDetail = models.TextField(verbose_name='申请详情', default='')
    can_revise = models.CharField('是否可以修改', max_length=50, default='1')
    fj_number = models.CharField('附件id', max_length=50, default='')
    current_audit_users = models.ManyToManyField('personal_center.User', verbose_name='当前审核人员', related_name='computer_device_users', blank=True)
    audit_users_already = models.ManyToManyField('personal_center.User', verbose_name='已审核人员', related_name='computer_device_already_audit_users', blank=True)

    def get_state_str(self):
        if self.state == 'six':
            return '拒绝'
        elif self.state == 'seven':
            return '结束'
        elif self.state == 'stop':
            return '终止'
        elif self.state == 'draft':
            return '草稿'
        else:
            return '审核中'


class ComputerDeviceRecord(BaseModel):
    STATE = (
        ('draft', '拒绝'),
        ('audit', '同意'),
        ('unaudit', '待审核'),
    )
    NODE = (
        ('one', '科室负责人'),
        ('two', '网络信息科'),
        ('three', '申请科室分管领导'),
        ('four', '采购部门分管领导'),
    )
    purchasing_requisition_id = models.ForeignKey('ComputerDevice', verbose_name="计算机及相关设备购置", blank=False, null=False, on_delete=models.CASCADE)
    state = models.CharField('状态', max_length=10, choices=STATE, default='unaudit')
    audit_people = models.ForeignKey('personal_center.User', verbose_name="审批人", blank=False, null=False, on_delete=models.CASCADE)
    audit_note = models.TextField(verbose_name="审批意见", blank=False)
    node = models.CharField('节点', max_length=10, choices=NODE, default='YB/DB')

    class Meta:
        managed = True
        verbose_name = '计算机及相关设备购置申请审批信息'
        verbose_name_plural = verbose_name

class ConfidentialInformation(BaseModel):
    STATE = (
        ('draft', '草稿'),
        ('one', '科室负责人'),
        ('two', '权属管理部门负责人'),
        ('three', '纪委报备/网络信息科'),
        ('four', '权属管理部门分管院长'),
        ('five', '网络信息科分管院长'),
        ('six', '网络信息科执行'),
        ('eight', '拒绝'),
        ('seven', '结束'),
        ('stop', '终止'),
    )
    state = models.CharField('状态', max_length=10, choices=STATE, default='one')
    apply_user = models.ForeignKey('personal_center.User', verbose_name="申请人", blank=True, null=True, on_delete=models.SET_NULL)
    company = models.ForeignKey('administrative.Company', verbose_name="上传科室", blank=False, null=False, on_delete=models.CASCADE)
    ApplicationReason = models.CharField(max_length=225, verbose_name='申请理由', default='1')
    ApplicationDetail = models.TextField(verbose_name='申请详情', default='')
    can_revise = models.CharField('是否可以修改', max_length=50, default='1')
    current_audit_users = models.ManyToManyField('personal_center.User', verbose_name='当前审核人员', related_name='confidential_information_users', blank=True)
    audit_users_already = models.ManyToManyField('personal_center.User', verbose_name='已审核人员', related_name='confidential_information_already_audit_users', blank=True)

    def get_state_str(self):
        if self.state == 'eight':
            return '拒绝'
        elif self.state == 'seven':
            return '结束'
        elif self.state == 'stop':
            return '终止'
        elif self.state == 'draft':
            return '草稿'
        else:
            return '审核中'


class ConfidentialInformationRecord(BaseModel):
    STATE = (
        ('draft', '拒绝'),
        ('audit', '同意'),
        ('unaudit', '待审核'),
    )
    NODE = (
        ('one', '科室负责人'),
        ('two', '网络信息科'),
        ('three', '申请科室分管领导'),
        ('four', '采购部门分管领导'),
    )
    purchasing_requisition_id = models.ForeignKey('ConfidentialInformation', verbose_name="机密数据外导申请", blank=False, null=False, on_delete=models.CASCADE)
    state = models.CharField('状态', max_length=10, choices=STATE, default='unaudit')
    audit_people = models.ForeignKey('personal_center.User', verbose_name="审批人", blank=False, null=False, on_delete=models.CASCADE)
    audit_note = models.TextField(verbose_name="审批意见", blank=False)
    node = models.CharField('节点', max_length=10, choices=NODE, default='YB/DB')

    class Meta:
        managed = True
        verbose_name = '机密数据外导申请审批信息'
        verbose_name_plural = verbose_name


class BiddingProcurementProject(BaseModel):
    STATE = (
        ('draft', '草稿'),
        ('one', '科室负责人'),
        ('two', '项目分管领导审核'),
        ('three', '招标办确定采购方式'),
        ('four', '招标办分管领导审核'),
        ('five', '申请部门（上传询价过程资料）'),
        ('six', '招标办审核'),
        ('eight', '拒绝'),
        ('seven', '结束'),
        ('stop', '终止'),
    )
    state = models.CharField('状态', max_length=10, choices=STATE, default='one')
    apply_user = models.ForeignKey('personal_center.User', related_name='bidding_apply_user', verbose_name="申请人", blank=True, null=True, on_delete=models.SET_NULL)
    company = models.ForeignKey('administrative.Company', verbose_name="申请科室", blank=False, null=False, on_delete=models.CASCADE)
    ApplicationReason = models.CharField(max_length=225, verbose_name='项目名称', default='1')
    categories = models.CharField(max_length=11, verbose_name='采购类别', default='1')          # 1、工程类，2、货物类，3、服务类
    budget_amount = models.CharField(max_length=225, verbose_name='预算金额', default='')
    source = models.CharField(max_length=225, verbose_name='经费来源', default='')
    project_leader = models.CharField(max_length=100, verbose_name='项目负责人', default='')
    telephone = models.CharField(max_length=100, verbose_name='联系电话', default='')
    contact_person = models.CharField(max_length=100, verbose_name='咨询联系人', default='')
    contact_telephone = models.CharField(max_length=100, verbose_name='咨询联系人电话', default='')
    project_meeting = models.CharField(max_length=100, verbose_name='立项通过会议', default='')           # 1、院办会议，2、党委会
    minutes_number_year = models.CharField(max_length=100, verbose_name='会议年份', default='')
    minutes_number_number = models.CharField(max_length=100, verbose_name='会议编号', default='')
    procurement = models.CharField(max_length=50, verbose_name='采购方式', default='')                  # 1、公开招标，2、邀请招标，3、竞争性谈判，4、竞争性磋商，5、询价，6、单一来源采购，7、其他采购方式
    open_ornot = models.CharField(max_length=10, verbose_name='意向是否公开', default='')
    can_revise = models.CharField('是否可以修改', max_length=50, default='1')
    fj_number = models.CharField('附件id', max_length=50, default='')
    topic_number = models.CharField('第几个议题', max_length=50, default='')
    current_audit_users = models.ManyToManyField('personal_center.User', verbose_name='当前审核人员', related_name='bidding_procurement_users', blank=True)
    audit_users_already = models.ManyToManyField('personal_center.User', verbose_name='已审核人员', related_name='bidding_procurement_already_audit_users', blank=True)
    amount_conditions = models.CharField('是否3万元以上', max_length=50, default='1')             # 1：三万元以上，0：三万元一下

    def get_state_str(self):
        if self.state == 'eight':
            return '拒绝'
        elif self.state == 'seven':
            return '结束'
        elif self.state == 'stop':
            return '终止'
        elif self.state == 'draft':
            return '草稿'
        else:
            return '审核中'

    def get_categories(self):
        if self.categories == '1':
            return '工程类'
        elif self.categories == '2':
            return '货物类'
        else:
            return '服务类'

    def get_meeting(self):
        if self.project_meeting == '1':
            return '院长办公会'
        else:
            return '党委会'

    def get_procurement(self):
        if self.procurement == '1':
            return '公开招标'
        elif self.procurement == '2':
            return '邀请招标'
        elif self.procurement == '3':
            return '竞争性谈判'
        elif self.procurement == '4':
            return '竞争性磋商'
        elif self.procurement == '5':
            return '询价'
        elif self.procurement == '6':
            return '单一来源采购'
        else:
            return '其他采购方式'


class BiddingProcurementProjectRecord(BaseModel):
    STATE = (
        ('draft', '拒绝'),
        ('audit', '同意'),
        ('unaudit', '待审核'),
    )
    NODE = (
        ('one', '科室负责人'),
        ('two', '项目分管领导审核'),
        ('three', '招标办确定采购方式'),
        ('four', '招标办分管领导审核'),
        ('five', '书记或院长审核')
    )
    parent_id = models.ForeignKey('BiddingProcurementProject', verbose_name="招标采购项目申请", blank=False, null=False, on_delete=models.CASCADE)
    state = models.CharField('状态', max_length=10, choices=STATE, default='unaudit')
    audit_people = models.ForeignKey('personal_center.User', verbose_name="审批人", blank=False, null=False, on_delete=models.CASCADE)
    audit_note = models.TextField(verbose_name="审批意见", blank=False)
    node = models.CharField('节点', max_length=10, choices=NODE, default='one')

    class Meta:
        managed = True
        verbose_name = '招标采购项目申请信息'
        verbose_name_plural = verbose_name


class ProcessModification(BaseModel):
    STATE = (
        ('draft', '草稿'),
        ('one', '科室负责人'),
        ('two', '分管领导审核'),
        ('three', '院长办公室选择是否转审院领导'),
        ('four', '书记或院长审核'),
        ('five', '网络信息科接收'),
        ('eight', '拒绝'),
        ('seven', '结束'),
        ('stop', '终止'),
    )
    state = models.CharField('状态', max_length=10, choices=STATE, default='one')
    apply_user = models.ForeignKey('personal_center.User', related_name='process_apply_user', verbose_name="申请人", blank=True, null=True, on_delete=models.SET_NULL)
    company = models.ForeignKey('administrative.Company', verbose_name="申请科室", blank=False, null=False, on_delete=models.CASCADE)
    can_revise = models.CharField('是否可以修改', max_length=50, default='1')
    fj_number = models.CharField('附件id', max_length=50, default='')
    demand_type = models.CharField('需求类别', max_length=11, default='')               # 1、权限新增修改；2、流程节点新增修改；3、审核人员修改；4、流程轮转
    urgency_level = models.CharField('紧急程度', max_length=50, default='')
    reason = models.TextField(verbose_name="申请原因", default='')
    notes = models.CharField('备注', max_length=225, blank=True, default='')
    current_audit_users = models.ManyToManyField('personal_center.User', verbose_name='当前审核人员', related_name='process_users', blank=True)
    audit_users_already = models.ManyToManyField('personal_center.User', verbose_name='已审核人员', related_name='process_already_audit_users', blank=True)


class ProcessModificationRecord(BaseModel):
    STATE = (
        ('draft', '拒绝'),
        ('audit', '同意'),
        ('unaudit', '待审核'),
    )
    NODE = (
        ('one', '科室负责人'),
        ('two', '分管领导审核'),
        ('three', '院长办公室选择是否转审院领导'),
        ('four', '书记或院长审核'),
        ('five', '网络信息科接收')
    )
    parent_id = models.ForeignKey('ProcessModification', verbose_name="权限需求申请", blank=False, null=False, on_delete=models.CASCADE)
    state = models.CharField('状态', max_length=10, choices=STATE, default='unaudit')
    audit_people = models.ForeignKey('personal_center.User', verbose_name="审批人", blank=False, null=False, on_delete=models.CASCADE)
    audit_note = models.TextField(verbose_name="审批意见", blank=False)
    node = models.CharField('节点', max_length=10, choices=NODE, default='one')

    class Meta:
        managed = True
        verbose_name = '权限需求申请'
        verbose_name_plural = verbose_name

class TenderingSigning(BaseModel):
    STATE = (
        ('draft', '草稿'),
        ('one', '科室负责人'),
        ('two', '招标办分管领导'),
        ('three', '院领导会签'),
        ('four', '院长会签'),
        ('five', '党委委员会签'),
        ('eight', '拒绝'),
        ('end', '结束'),
        ('stop', '终止'),
    )
    state = models.CharField('状态', max_length=10, choices=STATE, default='one')
    apply_user = models.ForeignKey('personal_center.User', related_name='tendering_signing_apply_user', verbose_name="申请人", blank=True, null=True, on_delete=models.SET_NULL)
    company = models.ForeignKey('administrative.Company', verbose_name="申请科室", blank=False, null=False, on_delete=models.CASCADE)
    can_revise = models.CharField('是否可以修改', max_length=50, default='1')
    fj_number = models.CharField('附件id', max_length=50, default='')
    current_audit_users = models.ManyToManyField('personal_center.User', verbose_name='当前审核人员', related_name='tendering_signing', blank=True)
    audit_users_already = models.ManyToManyField('personal_center.User', verbose_name='已审核人员', related_name='tendering_signing_already_audit_users', blank=True)
    entry_name = models.CharField('项目名称', max_length=255, default='')
    budget_amount = models.CharField('预算金额', max_length=155, default='')
    minutes_number = models.TextField(verbose_name="纪要编号", max_length=100, default='')
    procurement = models.CharField(max_length=50, verbose_name='采购方式', default='')  # 1、公开招标，2、邀请招标，3、竞争性谈判，4、竞争性磋商，5、询价，6、单一来源采购，7、其他采购方式
    open_time = models.CharField(max_length=50, verbose_name='开标时间', default='')
    winning_bidder = models.CharField(max_length=150, verbose_name='中标单位', default='')
    winning_money = models.CharField(max_length=150, verbose_name='中标金额', default='')
    more_than = models.CharField(max_length=20, verbose_name='是否大于20万', default='1')            # 1：大于20万（是），0：大于20万（否）

    def get_state_str(self):
        if self.state == 'eight':
            return '拒绝'
        elif self.state == 'end':
            return '结束'
        elif self.state == 'stop':
            return '终止'
        elif self.state == 'draft':
            return '草稿'
        else:
            return '审核中'

    def get_procurement(self):
        if self.procurement == '1':
            return '公开招标'
        elif self.procurement == '2':
            return '邀请招标'
        elif self.procurement == '3':
            return '竞争性谈判'
        elif self.procurement == '4':
            return '竞争性磋商'
        elif self.procurement == '5':
            return '询价'
        elif self.procurement == '6':
            return '单一来源采购'
        elif self.procurement == '7':
            return '其他采购方式'
        else:
            return ''

class TenderingSigningRecord(BaseModel):
    STATE = (
        ('draft', '拒绝'),
        ('audit', '同意'),
        ('unaudit', '待审核'),
    )
    NODE = (
        ('one', '科室负责人'),
        ('two', '招标办分管领导'),
        ('three', '院领导会签'),
    )
    parent_id = models.ForeignKey('TenderingSigning', verbose_name="招标采购会签", blank=False, null=False, on_delete=models.CASCADE)
    state = models.CharField('状态', max_length=10, choices=STATE, default='unaudit')
    audit_people = models.ForeignKey('personal_center.User', verbose_name="审批人", blank=False, null=False, on_delete=models.CASCADE)
    audit_note = models.TextField(verbose_name="审批意见", blank=False)
    node = models.CharField('节点', max_length=10, choices=NODE, default='one')